<template>
  <div>
     <div>
       <div class="Serchuname">
          <span>{{title}}</span>
          <svg t="1644566413746" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3576" width="18" height="18"><path d="M536 480v192a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16V480a16 16 0 0 1 16-16h16a16 16 0 0 1 16 16z m-32-128h16a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16z m8 448c159.056 0 288-128.944 288-288s-128.944-288-288-288-288 128.944-288 288 128.944 288 288 288z m0 48c-185.568 0-336-150.432-336-336s150.432-336 336-336 336 150.432 336 336-150.432 336-336 336z" p-id="3577"></path></svg>
       </div>
       <div class="box">
          <div class="box_right">
            <span class="bigSpan">{{pirce}}</span>
            <div class="Span_right">
                <span>{{num}}</span>
                <slot name='svg'></slot>
            </div>
          </div>
          <div class="Boxline" ref="Boxline"></div>
       </div>
     </div>
  </div>
</template>

<script>
import * as echarts from 'echarts';
export default {
    name:'SerchLine',
    props:['title','pirce','num'],
     mounted() {
        let myChart = echarts.init(this.$refs.Boxline);
        myChart.setOption({
            xAxis: {
                show:false,
                type:'category'
            },
            yAxis: {
                show:false
            },
            grid:{
                bottom:0,
                top:0,
                left:-15,
                right:0
            },
            series: [
                {
                type: 'line',
                data: [50, 10, 76, 24, 35, 20, 40, 16, 52],
                smooth:true,
                itemStyle: {
                        color: '#0770FF',
                        opacity:0
                    },
                areaStyle :{
                         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                            {
                                offset: 0,
                                color: 'rgba(58,77,233,0.8)'
                            },
                            {
                                offset: 1,
                                color: 'rgba(58,77,233,0.3)'
                            }
                            ])   
                    }
                }
            ]
            });
    },
}
</script>

<style lang="scss" scoped>
.Serchuname{
  display: flex;
  align-items: center;
  color: rgb(184, 179, 179);
  span{
    font-size: 15px;
    margin-right: 5px;
  }
}
.box{
  .box_right{
    display: flex;
    align-items: center;
    margin-top: 10px;
    .bigSpan{
      font-size: 20px;
      font-weight: 600;
    }
    .Span_right{
      margin-left: 20px;
      span{
        font-size: 14px;
        color: rgb(184, 179, 179);
      }
    }
  }
  .Boxline{
    width: 100%;
    height: 50px;
  }
}
</style>